<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>车险</title>
    <script type="text/javascript" src="/static/plugins/jquery-easyui/jquery.min.js"></script>
    <script type="text/javascript" src="/static/plugins/jquery-easyui/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="/static/plugins/jquery-easyui/locale/easyui-lang-zh_CN.js"></script>

    <link rel="stylesheet" href="/static/css/login_style.css">
    <script>
        $(function () {
            $(".styled-button").click(function () {
                $.post("/login.do", $(".form").serialize(), function (data) {
                    if (data.success) {
                        window.location.href = "/index.do";
                    } else {
                     alert(data.msg);
                    }
                })
            })
        });
    </script>
</head>
<body>
<main>
    <form class="form" method="post">
        <div class="form__cover"></div>
        <div class="form__loader">
            <div class="spinner active">
                <svg class="spinner__circular" viewBox="25 25 50 50">
                    <circle class="spinner__path" cx="50" cy="50" r="20" fill="none" stroke-width="4"
                            stroke-miterlimit="10"></circle>
                </svg>
            </div>
        </div>
        <div class="form__content">
            <h1></h1>
            <div class="styled-input">
                <input type="text" class="styled-input__input" name="username">
                <div class="styled-input__placeholder">
                    <span class="styled-input__placeholder-text">Username</span>
                </div>
                <div class="styled-input__circle"></div>
            </div>
            <div class="styled-input">
                <input type="password" class="styled-input__input" name="password">
                <div class="styled-input__placeholder">
                    <span class="styled-input__placeholder-text">Password</span>
                </div>
                <div class="styled-input__circle"></div>
            </div>
            <button type="button" class="styled-button">
				<span class="styled-button__real-text-holder">
					<span class="styled-button__real-text">Submit</span>
					<span class="styled-button__moving-block face">
						<span class="styled-button__text-holder">
							<span class="styled-button__text">Submit</span>
						</span>
					</span><span class="styled-button__moving-block back">
						<span class="styled-button__text-holder">
							<span class="styled-button__text">Submit</span>
						</span>
					</span>
				</span>
            </button>
        </div>

    </form>
</main>
<script src="/static/js/login.js"></script>
</body>
</html>